package com.example.shardingdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDate;


@Data
@ToString
@TableName("sys_user")
public class UserDO  implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "uid", type = IdType.NONE)
    private Long uid;

    private String email;

    private String phone;

    private String username;

    private String password;

    private Integer userType;

    private Integer status;

    private String createIp;


    private LocalDate lastLoginTime;
    private LocalDate createTime;

    private String lastLoginIp;

    private Integer loginNum;

    private Integer tenantId;

    private String realName;

    private String avatar;

    public Integer getLoginNum() {
        return loginNum == null ? 0 : loginNum;
    }

}
